package org.ascollada.core
{
	import flash.display.BitmapData;
	
	import org.ascollada.core.ns.collada;
	import org.ascollada.utils.DaeLogger;
	
	public class DaeImage extends DaeElement
	{
		use namespace collada;
		
		public var init_from :String;
		
		public var data :BitmapData;
		
		/**
		 * 
		 */ 
		public function DaeImage(document:DaeDocument, element:XML=null)
		{
			super(document, element);
		}
		
		/**
		 * 
		 */
		public override function read(element:XML):void
		{
			super.read(element);
			
			if(element.init_from[0])
			{
				this.init_from = readText(element.init_from[0]);
			}
			else
			{
				DaeLogger.log("[ERROR] DaeImage : init_from element not found!");
			}
		} 
	}
}